Integrand size = 16, antiderivative size = 97 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=-\frac {b f x}{2 d}-\frac {b (d e+f-c f) (d e-(1+c) f) \arctan (c+d x)}{2 d^2 f}+\frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b (d e-c f) \log \left (1+(c+d x)^2\right )}{2 d^2} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {5155, 4972, 716, 649, 209, 266} \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=\frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b \arctan (c+d x) (-c f+d e+f) (d e-(c+1) f)}{2 d^2 f}-\frac {b (d e-c f) \log \left ((c+d x)^2+1\right )}{2 d^2}-\frac {b f x}{2 d} \]
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 716
Rule 4972
Rule 5155
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (\frac {d e-c f}{d}+\frac {f x}{d}\right ) (a+b \arctan (x)) \, dx,x,c+d x\right )}{d} \\ & = \frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b \text {Subst}\left (\int \frac {\left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^2}{1+x^2} \, dx,x,c+d x\right )}{2 f} \\ & = \frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b \text {Subst}\left (\int \left (\frac {f^2}{d^2}+\frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{d^2 \left (1+x^2\right )}\right ) \, dx,x,c+d x\right )}{2 f} \\ & = -\frac {b f x}{2 d}+\frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b \text {Subst}\left (\int \frac {(d e-f-c f) (d e+f-c f)+2 f (d e-c f) x}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f} \\ & = -\frac {b f x}{2 d}+\frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {(b (d e-c f)) \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d^2}-\frac {(b (d e+f-c f) (d e-(1+c) f)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{2 d^2 f} \\ & = -\frac {b f x}{2 d}-\frac {b (d e+f-c f) (d e-(1+c) f) \arctan (c+d x)}{2 d^2 f}+\frac {(e+f x)^2 (a+b \arctan (c+d x))}{2 f}-\frac {b (d e-c f) \log \left (1+(c+d x)^2\right )}{2 d^2} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.05 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.68 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=a e x+\frac {1}{2} a f x^2+b e x \arctan (c+d x)+\frac {b f \left (\frac {1}{2} d \left (-\frac {c}{d}+\frac {c+d x}{d}\right )^2 \arctan (c+d x)-\frac {1}{2} d \left (\frac {x}{d}-\frac {i (i-c)^2 \log (i-c-d x)}{2 d^2}+\frac {i (i+c)^2 \log (i+c+d x)}{2 d^2}\right )\right )}{d}-\frac {b e \left (-2 c \arctan (c+d x)+\log \left (1+c^2+2 c d x+d^2 x^2\right )\right )}{2 d} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.16
method | result | size |
parts | \(a \left (\frac {1}{2} f \,x^{2}+e x \right )+\frac {b \left (\frac {\arctan \left (d x +c \right ) \left (d x +c \right )^{2} f}{2 d}-\frac {\arctan \left (d x +c \right ) c f \left (d x +c \right )}{d}+\arctan \left (d x +c \right ) e \left (d x +c \right )-\frac {f \left (d x +c \right )+\frac {\left (-2 c f +2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{2}-f \arctan \left (d x +c \right )}{2 d}\right )}{d}\) | \(113\) |
derivativedivides | \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \left (\arctan \left (d x +c \right ) f c \left (d x +c \right )-\arctan \left (d x +c \right ) e d \left (d x +c \right )-\frac {\arctan \left (d x +c \right ) f \left (d x +c \right )^{2}}{2}+\frac {f \left (d x +c \right )}{2}-\frac {\left (2 c f -2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{4}-\frac {f \arctan \left (d x +c \right )}{2}\right )}{d}}{d}\) | \(130\) |
default | \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \left (\arctan \left (d x +c \right ) f c \left (d x +c \right )-\arctan \left (d x +c \right ) e d \left (d x +c \right )-\frac {\arctan \left (d x +c \right ) f \left (d x +c \right )^{2}}{2}+\frac {f \left (d x +c \right )}{2}-\frac {\left (2 c f -2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{4}-\frac {f \arctan \left (d x +c \right )}{2}\right )}{d}}{d}\) | \(130\) |
parallelrisch | \(\frac {\arctan \left (d x +c \right ) b \,d^{2} f \,x^{2}+a \,d^{2} f \,x^{2}+2 x \arctan \left (d x +c \right ) b \,d^{2} e +2 a \,d^{2} e x -\arctan \left (d x +c \right ) b \,c^{2} f +2 b c d e \arctan \left (d x +c \right )+b c f \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )-b d e \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )-b d f x -a \,c^{2} f -4 a c d e +\arctan \left (d x +c \right ) b f +2 b c f -a f}{2 d^{2}}\) | \(160\) |
risch | \(-\frac {i b \left (f \,x^{2}+2 e x \right ) \ln \left (1+i \left (d x +c \right )\right )}{4}+\frac {i b f \,x^{2} \ln \left (1-i \left (d x +c \right )\right )}{4}+\frac {i b e x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {a f \,x^{2}}{2}-\frac {\arctan \left (d x +c \right ) b \,c^{2} f}{2 d^{2}}+\frac {b c e \arctan \left (d x +c \right )}{d}+a e x +\frac {b c f \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d^{2}}-\frac {b e \ln \left (d^{2} x^{2}+2 c d x +c^{2}+1\right )}{2 d}-\frac {b f x}{2 d}+\frac {\arctan \left (d x +c \right ) b f}{2 d^{2}}\) | \(175\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.06 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=\frac {a d^{2} f x^{2} + {\left (2 \, a d^{2} e - b d f\right )} x + {\left (b d^{2} f x^{2} + 2 \, b d^{2} e x + 2 \, b c d e - {\left (b c^{2} - b\right )} f\right )} \arctan \left (d x + c\right ) - {\left (b d e - b c f\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{2 \, d^{2}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 15.21 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.82 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=\begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {atan}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {atan}{\left (c + d x \right )}}{d} + \frac {b c f \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d^{2}} - \frac {i b c f \operatorname {atan}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {atan}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {atan}{\left (c + d x \right )}}{2} - \frac {b e \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{d} + \frac {i b e \operatorname {atan}{\left (c + d x \right )}}{d} - \frac {b f x}{2 d} + \frac {b f \operatorname {atan}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {atan}{\left (c \right )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.20 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=\frac {1}{2} \, a f x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b f + a e x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b e}{2 \, d} \]
[In]
[Out]
\[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=\int { {\left (f x + e\right )} {\left (b \arctan \left (d x + c\right ) + a\right )} \,d x } \]
[In]
[Out]
Time = 1.93 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.40 \[ \int (e+f x) (a+b \arctan (c+d x)) \, dx=a\,e\,x+\frac {a\,f\,x^2}{2}-\frac {b\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d}+\frac {b\,f\,\mathrm {atan}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {atan}\left (c+d\,x\right )}{2}-\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {atan}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {atan}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,c\,f\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{2\,d^2}+\frac {b\,c\,e\,\mathrm {atan}\left (c+d\,x\right )}{d} \]
[In]
[Out]